package icu.wdtt.mapper;


import icu.wdtt.model.Authority;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AuthorityMapper {

    @Select("SELECT * FROM authority WHERE aid=#{aid}")
    public Authority get(int aid);
    @Select("SELECT * FROM authority")
    public List<Authority> getAll();
    @Insert("INSERT INTO authority VALUES (null,#{aname},#{aurl},#{adescribe},#{permissionCode},#{menuLevel}")
    public void add(Authority authority);
    @Delete("DELETE FROM authority WHERE aid=#{aid}")
    public void del(int aid);
    @Update("UPDATE authority SET aname=#{aname},aurl=#{aurl},adescribe=#{adescribe},#{permissionCode},#{menuLevel} WHERE aid=#{aid}")
    public void update(Authority authority);
}
